package com.caineng.zhaobiao.zbapi.controller;

import com.caineng.zhaobiao.zbapi.dao.CaiCompanyBiddingListDao;
import com.caineng.zhaobiao.zbapi.dao.CaiCompanyDao;
import com.caineng.zhaobiao.zbapi.domain.*;
import com.caineng.zhaobiao.zbapi.utils.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 企业服务类
 * @author liandyao
 * @date 2022/7/18 15:46
 */
@Api(tags = "企业信息修改服务模块")
@RestController
@RequestMapping("/zbapi/companyUpdate")
public class CaiCompanyUpdateController {

    @Autowired
    CaiCompanyDao companyDao;

    @Autowired
    CaiCompanyBiddingListDao caiCompanyBiddingListDao;

    @PostMapping("/addCompany")
    @ApiOperation(value = "增加和修改企业")
    public AjaxResult saveCompany(CaiCompany company){
        companyDao.save(company);
        return AjaxResult.success("保存成功");
    }


    @PostMapping("/addCompanyBiddingListDao")
    @ApiOperation(value = "增加和修改企业")
    public AjaxResult saveCompanyBiddingListDao(CaiCompanyBiddingList company,
                                                CaiCompanyChangeRecordList caiCompanyChangeRecordList,
                                                CaiCompanyMainStuffList caiCompanyMainStuffList,
                                                CaiCompanyProjectDetailsList caiCompanyProjectDetailsList,
                                                CaiCompanyQualificationDetailsList caiCompanyQualificationDetailsList,
                                                CaiCompanyRegisteredPersonnelDetailsList caiCompanyRegisteredPersonnelDetailsList,
                                                CaiCompanyCreditRateList caiCompanyCreditRateList

    ){

        return AjaxResult.success("保存成功");
    }

}
